<?php

class Api_Admin extends PhalApi_Api {

    public function getRules() {

        return array(
            'login'      => array(
                'Email'    => array('name' => 'Email'),
                'Password' => array('name' => 'Password'),
            ),
            "registered" => array()
        );
    }

    public function login() {

        if (isset($this->Email) && isset($this->Password) && $this->Email == "admin@admin.com" && $this->Password = "admin") {
            DI()->smarty->show("AdminLTE.index");
        }
        DI()->smarty->show();
    }

    public function registered() {

        DI()->smarty->show();
    }
}
